package design_pattern.ObserveThread.basic;

/**
 * @Author: 蔡翔
 * @Date: 2019/10/30 13:41
 * @Version 1.0
 *
 * 二进制观察者，有变化 这里可以观察到
 */
public class BinaryObserver extends Observer {

    public BinaryObserver(Subject subject){
        super(subject);
    }

    @Override
    public void update() {
        System.out.println("Binary String:"+Integer.toBinaryString(subject.getState()));
    }
}
